package ast;


import java.util.ArrayList;

import org.antlr.runtime.Token;

import ast.terminais.Identifier;
import ast.terminais.Tipo;

public class List_Var_Id extends Lista_variaveis{
	
    public List_Var_Id(Token payload) {
		super(payload);
	
	}
	
    public ArrayList<Identifier> getIdentifier() {
		ArrayList<Identifier> result = new ArrayList<Identifier>();
		
		for (Object node : getChildren()) {
			if(node instanceof Identifier){
	          Identifier id = (Identifier) node;
			  result.add(id);
			}
		}
		
		
		return result;
	}
	public Tipo getTipo() {
		 Tipo result = null;
		for (Object node : getChildren()) {
			if(node instanceof Tipo){
	         result = (Tipo) node;
	         break;
			}
		
		}
		return result;
	}

	@Override
	public Object accept(IVisitor visitor, Object o) {
	
		return visitor.visit(this, o);
	}

}
